<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="fz143896">pg_attrdef</title>
  <body>
    <p>The <codeph>pg_attrdef</codeph> table stores column default values. The main information
      about columns is stored in <xref href="pg_attribute.xml#topic1">pg_attribute</xref>. Only
      columns that explicitly specify a default value (when the table is created or the column is
      added) will have an entry here.</p>
    <table id="fz143898">
      <title>pg_catalog.pg_attrdef</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="60pt"/>
        <colspec colnum="3" colname="col3" colwidth="96pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>adrelid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_class.oid</entry>
            <entry colname="col4">The table this column belongs to</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>adnum</codeph>
            </entry>
            <entry colname="col2">int2</entry>
            <entry colname="col3">pg_attribute.attnum</entry>
            <entry colname="col4">The number of the column</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>adbin </codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">The internal representation of the column default value</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>adsrc</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">A human-readable representation of the default value. This field
              is historical, and is best not used.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
